}),
'debugexit': Lang.bind(this, function() {
- Meta.exit(Meta.ExitCode.ERROR);
+ Meta.quit(Meta.ExitCode.ERROR);
}),
// rt is short for "reload theme"
{
GOptionContext *ctx;
GError *error = NULL;
+ int ecode;
g_type_init ();
/* Initialize the global object */
shell_global_get ();
- return meta_run ();
+ ecode = meta_run ();
+
+ if (g_getenv ("GNOME_SHELL_ENABLE_CLEANUP"))
+ {
+ g_printerr ("Doing final cleanup...\n");
+ g_object_unref (shell_global_get ());
+ }
+
+ return ecode;
}
#include "shell-wm.h"
#include "st.h"
+static ShellGlobal *the_object = NULL;
+
static void grab_notify (GtkWidget *widget, gboolean is_grab, gpointer user_data);
struct _ShellGlobal {
g_strfreev (search_path);
}
+static void
+shell_global_finalize (GObject *object)
+{
+ ShellGlobal *global = SHELL_GLOBAL (object);
+
+ g_object_unref (global->js_context);
+ gtk_widget_destroy (GTK_WIDGET (global->grab_notifier));
+ g_object_unref (global->settings);
+
+ the_object = NULL;
+
+ G_OBJECT_CLASS(shell_global_parent_class)->finalize (object);
+}
+
static void
shell_global_class_init (ShellGlobalClass *klass)
{
gobject_class->get_property = shell_global_get_property;
gobject_class->set_property = shell_global_set_property;
+ gobject_class->finalize = shell_global_finalize;
/* Emitted from gnome-shell-plugin.c during event handling */
shell_global_signals[XDND_POSITION_CHANGED] =
ShellGlobal *
shell_global_get (void)
{
- static ShellGlobal *the_object = NULL;
-
if (!the_object)
the_object = g_object_new (SHELL_TYPE_GLOBAL, 0);